package com.miyake.loveviewweb.client.viewer.table;

import com.miyake.loveviewweb.shared.model.DataModel;

public class TableFactory {
    private static TableFactory instance;
    private TableFactory() {
        
    }
    
    public static TableFactory getInstance() {
        if (instance == null) {
            instance = new TableFactory();
        }
        return instance;
    }
    
    public ITable createHeaderTable(DataModel dataModel) {
        return new HeaderGrid(dataModel);
    }
    
    public ITable createColumnTable(DataModel dataModel) {
        return new ColumnTable(dataModel);
    }
    
    public ITable createDataGrid(DataModel dataModel) {
        return new DataGridTable(dataModel);
    }
    
    public ITable createXCVTable(DataModel dataModel, String separator) {
        return new XCV(dataModel, separator);
    }
    
}
